#include "string/istrcmp.h"

static __inline__ int __istrcmp_utol (int);


int istrcmp (char *string, char *compare) 
{

	register const char *s = string;
	register const char *c = compare;
	register int sc, cc;

	do {
		sc = __istrcmp_utol(*s++);
		cc = __istrcmp_utol(*c++);

		if ((sc | cc) == 0)
			return sc - cc;
	
	} 
	while (sc == cc);

	return sc - cc;

}

int __istrcmp_utol (int c)
{
	return ((c - 97) < 0)? c+32:c;
}
